package com.byxy.service;

import java.io.Serializable;
import java.util.List;

import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.byxy.common.service.BaseServiceImpl;
import com.byxy.entity.User;
@Service
@Transactional
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService {

	@Override
	public User login(User u) {
		
		for(User user:this.all()) {
			if(u.getLoginname().equals(user.getLoginname())&&u.getPassword().equals(user.getLoginname())) {
				return user;
			}
		}
		return null;
	}

}
